<!DOCTYPE html>
<html class="am-touch js cssanimations">
<head>
    <meta charset="utf-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge" />
    <title>期待</title>
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no" />
    <meta name="renderer" content="webkit" />
    <link rel="icon" type="image/png" href="../assets/i/favicon.png" />
    <link rel="stylesheet" href="../assets/css/amazeui.min.css" />
    <link rel="stylesheet" href="../assets/css/app2.css" />
    <style type="text/css">
        p{margin: 0;padding: 0;}
        .am-g p{text-align: center;}
        .green{color: #2dc22d}
        .red{color: #ef4437}
        .am-btn-default{background-color: #cccccc;border-color: #bebcb5;color: #fff}
    </style>
</head>
<body>
<div style="width: 100%; height: 100%; overflow: hidden; text-align: left;position: fixed;top: 35%;padding: 0 20px;text-indent: 2em">
    <p style="color: #666666;">很遗憾您的位置暂时不在我们的服务范围内，我们会加快服务网点建设。感谢您的关注！</p>
    <hr class="am-divider am-divider-default">
    <h3>您可以选择：</h3>
    <div class="am-g">
        <p class="am-u-sm-5 am-text-sm green">168</p>
        <p class="am-u-sm-7 am-text-sm red">12</p>
    </div>
    <div class="content-btn">
        <button type="button" id="success" class="am-btn am-btn-success am-u-sm-6">很期待啊！</button>
        <button type="button" id="danger" class="am-btn am-btn-danger am-u-sm-6">这不公平！</button>
    </div>
</div>
<script src="../assets/js/jquery.min.js" type="text/javascript"></script>
<script type="text/javascript">
    $(function() {
        $greenVal = $('.am-g p.green').text();
        $redVal = $('.am-g p.red').text()

        $('.content-btn #success').on('touchstart', function() {
            $greenVal++;
            $('.am-g p.green').text($greenVal);
            buttonFun();
        });

        $('.content-btn #danger').on('touchstart', function() {
            $redVal++;
            $('.am-g p.red').text($redVal);
            buttonFun();
        });
    });

    function buttonFun() {
        var self = $('.content-btn button');
        for (var i = 0; i < self.length; i++) {
            $(self[i]).addClass('am-btn-default');
            $(self[i]).attr('disabled',true);
        }
    }
</script>
</body>
</html>